package org.wyn.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 提供一些FreeMarker页面用到的方法
 * @author wyn
 *
 */
public class FreeMarkerUtil {
	private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm");
	/**
	 * 转化时间
	 * @param time
	 * @return
	 */
	public String formatTime(){
		return "time";
	}
	public String formatTime(String s){
		return s;
	}
	public String formatTime(long l){
		
		try {
			return sdf.format(new Date(l));
		} catch (Exception e) {
			return "";
		}
	}
	public static void main(String[] args) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm");
		System.out.println(sdf.format(new Date()));
	}
}
